//TIP 要<b>运行</b>代码，请按 <shortcut actionId="Run"/> 或
// 点击装订区域中的 <icon src="AllIcons.Actions.Execute"/> 图标。
public class Main {
    public static void main(String[] args) {
        // 客户端通过书籍工厂获取书籍
        Book book1 = BookFlyweightFactory.getBook("1");
        book1.display("张三", "爱情故事");

        Book book2 = BookFlyweightFactory.getBook("2");
        book2.display("王五", "戏剧小说");

        Book book3 = BookFlyweightFactory.getBook("1");
        book3.display("张三", "爱情故事");
    }
}